<!--#include file="./doctype.html"-->
<title>修改网站变量配置-<%=siteTitle%>-后台管理</title>
</head><body>
<div class="wrap">
	<ol class="breadcrumb">
		<li><a href="<%=fileName%>?q=index">列表首页</a></li>
		<li class="active"><a href="javascript:;" class="reload">批量修改</a></li>
	</ol>
	<form method="post" action="<%=fileName%>?q=saveBatch" class="mb10" role="form">
		<input type="hidden" value="<%=batchId%>" name="batchId">
		<%
		dim name, value, remark, system, name1, value1
		for i = 0 to ubound(data, 2)
			Tid = data(0, i)
			name = data(1, i)
			value = data(2, i)
			remark = app.hec(data(3, i))
			system = data(4, i)
			name1 = lcase(name)
			value1 = app.hec(value)
			%>
			<div class="form-group fix">
			<input type="hidden" name="isSystem_<%=Tid%>" value="<%=system%>" />
			<% if inStr(name1, "viewid") > 0 then %>
				<div class="inline w30 view_id" data-name="configValue_<%=Tid%>" data-id="<%=value%>"></div>
				<label class="inline control-label" for="configValue_<%=Tid%>"><%=remark%> {$C(<%=name%>)}</label>
			<% elseif name1 = "checkamount" then %>
				<div class="inline w30 check_code" data-name="configValue_<%=Tid%>" data-id="<%=value%>"></div>
				<label for="<%=name%>" class="inline control-label"><%=remark%> {$C(<%=name%>)}</label>
			<% else %>
				<% if isNumeric(value) then %>
					<input id="<%=name%>" name="configValue_<%=Tid%>" class="form-control inline w30" placeholder="<%=remark%>" value="<%=value1%>" />
					<label class="inline control-label" for="<%=name%>"><%=remark%> {$C(<%=name%>)}</label>
				<% else %>
					<% if len(value) < 30 then %>
						<input id="<%=name%>" name="configValue_<%=Tid%>" class="form-control inline w30" placeholder="<%=remark%>" value="<%=value1%>" />
						<label class="inline control-label" for="<%=name%>"><%=remark%> {$C(<%=name%>)}</label>
					<% else %>
						<label for="<%=name%>" class="control-label"><%=remark%> {$C(<%=name%>)}</label>
						<textarea id="<%=name%>" name="configValue_<%=Tid%>" class="form-control" rows="1" placeholder="<%=remark%>"><%=value1%></textarea>
					<% End if %>
				<% End if %>
			<% End if %>
			</div>
		<% next %>
		<div class="form-group fix text-center submit_box"></div>
	</form>
    <!--#include file="loadTime.html"-->
</div>
<script>
$(document).ready(function() {
	$('.view_id').getView();
	$('.check_code').each(function() {
        var self = $(this), name = self.attr('data-name'), id = self.attr('data-id'),
        code = "2位数 4位数 6位数 8位数 10位数".split(' '),
        val = ['<select id="'+name+'" name="'+name+'" class="form-control inline w30">'];
        $.each(code, function(i, n) {
            val.push('<option value="' + cj.int(n)+ '"' +
                (id == cj.int(n) ? ' selected="selected"' : '') +
                '>' + n + '</option>');
        });
        val.push('</select>');
        self.html(val.join(''));
	});
});
</script>
</body>
</html>